* VOLATILE TOP INCOME SHARES IN SWITZERLAND? REASSESSING THE EVOLUTION BETWEEN 1981 AND 2010

* MASTER DO-FILE * * MASTER DO-FILE * * MASTER DO-FILE * * MASTER DO-FILE *

/*
NOTE: 
This file creates nescessary subfolders and runs all the do-files in the correct order.
Furthermore, the path to run the files is defined here in a global macro
*/

* 1) define the path to run all the files correctly
	// NOTE: All the do-files and data need to be in this folder (named CODE here)
global thepath "/Users/isabel/PhD/Dropbox/Top Income Shares/R&R/CODE"


* 2) create the directories
mkdir "$thepath/results"
mkdir "$thepath/results/figures"
mkdir "$thepath/results/OLS"
mkdir "$thepath/results/special_cases"
mkdir "$thepath/results/synthetic_control"



* 3) run the do-files

** Estimation of top income shares 1981-2010
do "$thepath/1_Pareto_interpolation_1981-2010.do"

** Estimation of top income shares during the missing years 1995-2002
do "$thepath/2_estimate_missing_years.do"

** Estimation of share of special cases among top groups (3b cannot be run because data is proprietary)
// do "$thepath/3a_Pareto_interpolation_1971-80.do" // this file would run
// do "$thepath/3b_Special_cases.do" // this file does not run, because data is proprietary

** Estimation of top labor income shares
do "$thepath/5_Pareto_interpolation_labor_incomes.do"

** Estimation of top wealth shares (inlc. correction for pension wealth)
do "$thepath/6_TopWealthShares.do"

** Prepare datesets for the figures
	//NOTE: to produce the figures, R script needs to be run
do "$thepath/Figures.do"

